<?php
include("includes.php"); 

$member = New Membership();
$member->confirm_member();

$agenda = new Agenda();
$counter = 1;

include('header.php');
?>

<div id='agenda'>  
  <div id='agenda-header'>
    <?php echo $agenda->link_prevWeek(); ?>
    <h2><span><?php echo $agenda->get_date(); ?></span></h2>
    <?php echo $agenda->link_nextWeek(); ?>
  </div>

  <?php if ($agenda->week == 52) : ?>
    <img src='<?php echo BASE_URL; ?>/css/img/kerst.gif' title='Prettige kerst dagen!'>
  <?php else: ?>
  
  <table>
    <tr>
      <th class='time'>Tijd</th>
      <?php foreach (Agenda::days() as $day) : ?>
        <th><span><?php echo $agenda->display_day_nr($counter++); ?></span> <?php echo $day; ?></th>
      <?php endforeach; ?>
    </tr>
    
    <?php echo $agenda->printDays(); ?>  
  </table>

  <?php endif; ?>
  
</div>


<?php include('footer.php'); ?>
